import {baseRequest} from '@/services';


export async function currentUser(): Promise<{ data: Login.CurrentUser }> {
    // @ts-ignore
    return baseRequest<API.Result>('auth/rbacUser/current');
}

export async function currentRoutes() {
    // @ts-ignore
    return baseRequest<API.Result>('auth/rbacMenu/routes');
}

export async function outLogin() {
    return baseRequest('auth/rbacUser/outLogin');
}

export async function getCaptcha(phone: string) {
    return baseRequest<Login.Captcha>('auth/captcha', {phone});
}

export async function register() {
    return baseRequest<Login.Captcha>('auth/register', {});
}


